Skip to content

feat: let config choose the daemon's backend - #70

Merged
StuBehan merged 6 commits into
mainfrom
feat/serve-config-backend
Oct 25, 2026
Merged

StuBehan merged 6 commits into
mainfrom
feat/serve-config-backend

Conversation

@StuBehan

@StuBehan StuBehan commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a [serve] table to config.toml so stackvox serve can start on the mlx backend without flags. When something else starts the daemon (stack-nudge's launchd agent, or its own spawn when the socket is missing) there's nowhere to put --backend mlx --model-dir ..., so a resident MLX model has been flag-only until now.

  • [serve] takes backend, model_dir, model_adapter and the generation options, same names as the flags. Only serve acts on it, the config is shared by every install and a speak without the mlx extra shouldn't pick it up
  • --backend or --model-dir on the command line ignores the table, the flags then describe the model. Any other flag beats its key, and the reference clip and transcript count as one setting
  • relative paths resolve against the config file's folder (under launchd the cwd is /), unknown or badly typed keys warn and get dropped
  • if the configured model fails to load, serve logs it and falls back to kokoro, otherwise launchd restarts it every 10s into the same failure and you get no voice. A model named by flag still fails like before, and stackvox status now shows which backend is actually running
  • the daemon takes a startup lock before loading the model. With a slow model every spawn that found no socket was loading its own copy, and all but one died on bind. Now the rest exit straight away

Tested end to end with a local MLX model: three concurrent serves give one load and two clean exits, a missing model_dir falls back to kokoro and status says so. 412 tests, ruff and mypy clean.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread stackvox/config.py Resolved
Comment thread stackvox/config.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread README.md Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread stackvox/daemon.py Resolved
@StuBehan
StuBehan merged commit 35b34d5 into main Oct 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant